package com.example.demo.mapper;

import com.example.demo.entity.Watchlist;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper  // 确保加了这个注解
public interface WatchlistMapper {

    @Select("SELECT COUNT(*) FROM watchlist_tb WHERE user_id = #{userId}")
    int countFollowsByUserId(@Param("userId") int userId);

    // 其他查询方法
}
